<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/hmtBook/Public/css/list_header.css">
<link rel="stylesheet" type="text/css" href="/hmtBook/Public/css/bootstrap.min.css">
<script type="text/javascript"src="/hmtBook/Public/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript"src="/hmtBook/Public/js/bootstrap.min.js"></script>

<title><?php echo ($title); ?></title>
<style>
#sort span{margin:5px;font-size:15px;}
#sort{margin:5px;}
#sortTable{width:50%;margin:5px;}
#content span{margin:5px;font-size:15px;}
#content{margin:10px;}
small{margin:5px;}
</style>
<script>

	function check(){
		
		var checkbox=document.getElementById('checkbox');
		if(checkbox.checked==true){
			//被选中时，跳转
			window.location.href="/hmtBook/index.php/Home/List/index?type=showFlagOnly";
			
		}else window.location.href="/hmtBook/index.php/Home/List/index";
	}
	
	$('document').ready(function(){
			var type=$.getUrlVar('type');
			if(type=="showFlagOnly"){
				var checkbox=document.getElementById('checkbox');
				checkbox.checked=true;
				}
		});

	//获取url中的参数，摘自网络
	$.extend({
		  getUrlVars: function(){
		    var vars = [], hash;
		    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
		    for(var i = 0; i < hashes.length; i++)
		    {
		      hash = hashes[i].split('=');
		      vars.push(hash[0]);
		      vars[hash[0]] = hash[1];
		    }
		    return vars;
		  },
		  getUrlVar: function(name){
		    return $.getUrlVars()[name];
		  }
		});

</script>

</head>
<body>

<div id="header"class="navbar">
<div class="navbar-inner">
<ul class="inline unstyle nav">
<li class="dropdown">
<a dropdown-toggle" data-toggle="dropdown" data-target="#">首页<b class="caret"></b></a>

<ul class="dropdown-menu"  role="menu" aria-labelledby="dLabel">
<li><a href="/hmtBook/index.php/Home/Index">红满堂之家 </a>  </li>
<li class="divider"></li>
<li><a href="/hmtBook/index.php/Home/List/">通讯录 </a>  </li>
<li><a href="#">内部福利 </a>  </li>
<li><a href="#">光荣榜 </a>  </li>
</ul>
</li>
<li><a href="/hmtBook/index.php/Home/List/help">帮助</a></li>
<li><a href="/hmtBook/admin.php/Home/index/index">后台</a></li>
<li>
<form action="#" method="post"class="form-search navbar-form pull-left">
<div class="input-append">
    <input type="text" class="span3 search-query ">
    <button type="submit" class="btn ">搜索</button>
  </div>
<a  href="http://hometown.scau.edu.cn/" class="btn btn-info">进入红满堂论坛</a>
</form>
</li>

<li><p class="navbar-text">欢迎你,<?php echo (session('username')); ?></p></li>
<li><a href="/hmtBook/index.php/Home/List/editUserInfo">个人信息</a></li>
<li><a href="/hmtBook/index.php/Home/List/synUpdate">从论坛同步信息</a></li>
<li><a href="">BUG反馈</a></li>
<li><a href="/hmtBook/index.php/Home/List/logout">退出登录</a></li>

</ul>
</div>

</div>

<?php if(isset($notice)): ?><div id="myAlert" class="alert alert-warning">
   <a href="#" class="close" data-dismiss="alert">
   &times;
   </a>
   <span><?php echo ($notice); ?></span>
</div><?php endif; ?>

<div id="content">
<span  class="label label-success">系统成员列表</span><span><label class="checkbox inline" >只看在任<input type="checkbox"id="checkbox" value="showFlagOnly"onchange="check();"></label></span>
<table class="table table-striped table-hover table-bordered">
<tr><th>所属组</th><th>用户名</th><th>年级</th><th>性别</th><th>手机长号</th><th>手机短号</th><th>QQ</th><th>详细地址</th><th>学号</th><th>学院</th><th>专业</th><th>微信</th><th>操作</th></tr>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr><td><?php echo ($vo["groupname"]); ?></td><td><?php echo ($vo["username"]); ?><span class="badge"><?php if(($vo["flag"] == 1)): else: ?>retire<?php endif; ?></span></td><td><?php echo ($vo["grade"]); ?></td><td><?php echo ($vo["sex"]); ?></td><td><?php echo ($vo["longnum"]); ?></td><td><?php echo ($vo["shortnum"]); ?></td><td><?php echo ($vo["qq"]); ?></td><td><?php echo ($vo["address"]); ?></td><td><?php echo ($vo["student_id"]); ?></td><td><?php echo ($vo["college"]); ?></td><td><?php echo ($vo["subject"]); ?></td><td><?php echo ($vo["weixin"]); ?></td><td><a class="btn btn-info" href="/hmtBook/index.php/Home/List/userInfo?username=<?php echo ($vo["username"]); ?>">more</a></td></tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<span id="page"><?php echo ($page); ?></span>
</div>
<div id="sort">
<span  class="label label-success">人员统计</span><span class="label ">全部人员：<?php echo ($allMember); ?>人</span><span class="label label-warning">在任人员：<?php echo ($flagMember); ?>人</span>
</div>
<div id="sortTable">
<table class="table table-striped table-hover table-bordered" width="80%">
<tr>
<th >分组</th>
<?php if(is_array($groupTitle)): $i = 0; $__LIST__ = $groupTitle;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i;?><th ><a href="/hmtBook/index.php/Home/List/sortInfo?groupname=<?php echo ($so); ?>"><?php echo ($so); ?></a></th><?php endforeach; endif; else: echo "" ;endif; ?>
</tr>
<tr>
<td>人数</td>
<?php if(is_array($sortNum)): $i = 0; $__LIST__ = $sortNum;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i;?><td><?php echo ($so); ?></td><?php endforeach; endif; else: echo "" ;endif; ?>
</tr>
</table>
</div>

</body>
</html>